﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApp_DataTemplate
{
    /// <summary>
    /// Main2Window.xaml 的交互逻辑
    /// </summary>
    public partial class Main2Window : Window
    {
        public Main2Window()
        {
            InitializeComponent();
            Load();
        }

        public void Load()
        {
            List<TempColor> tempColors = new List<TempColor>()
            {
                new TempColor(){Code = "#FFB6C1",Name = "浅粉红"},
                new TempColor(){Code = "#DB7093",Name = "苍白的紫罗兰红色"},
                new TempColor(){Code = "#DA70D6",Name = "兰花的紫色"},
                new TempColor(){Code = "#4169E1",Name = "皇军蓝"},
                new TempColor(){Code = "#1E90FF",Name = "道奇蓝"},
                new TempColor(){Code = "#3CB371",Name = "春天的绿色"},
            };


            TestList.ItemsSource = tempColors;

        }
    }

    public class TempColor
    {
        public string Code { get; set; }

        public string Name { get; set; }
    }
}
